import { createRouter, createWebHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "UserLogin",
      component: () => import("../views/UserLogin.vue"),
    },
    {
      path: "/Menu",
      name: "Menu",
      component: () => import("../views/Menu.vue"),
      children: [
        {
          path: "/Goods",
          name: "Goods",
          component: () => import("../views/Rabbit/Goods.vue"),
        },
        {
          path: "/FindRoot",
          name: "FindRoot",
          component: () => import("../views/Rabbit/FindRoot.vue"),
        },
        {
          path: "/Demo",
          name: "Demo",
          component: () => import("../views/Demo/Demo.vue"),
        },
      ],
    },
    {
      path: "/about",
      name: "about",
      component: () => import("../views/AboutView.vue"),
    },
  ],
});

export default router;
